<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //箭头函数没有arguments
        {
            let fn1 = (...ccc)=>{
                //...ccc收集剩余参数 只能卸载最后面
                let sum = 0;
                for(let i=0;i<ccc.length;i++){
                    sum += ccc[i];
                }
                console.log(sum);
            }
            var arr = [1,2,3,4,5];
            var arr2 = [100,200];
            fn1(...arr,...arr2); //解构 ...arr === 1,2,3,4,5,'zs','lisi'
        }
    </script>
</body>
</html>